/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.admin.service;

import org.springblade.modules.admin.dto.openapi.HtDaySearchCondition;
import org.springblade.modules.admin.entity.MaintainPlanUserDayCount;
import org.springblade.modules.admin.entity.MaintainSign;
import org.springblade.modules.admin.vo.MaintainSignVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.admin.vo.openapi.HtUserPlanVO;

import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;

/**
 * 维保签到明细 服务类
 *
 * @author BladeX
 * @since 2021-05-11
 */
public interface IMaintainSignService extends BaseService<MaintainSign> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param maintainSign
	 * @return
	 */
	IPage<MaintainSignVO> selectMaintainSignPage(IPage<MaintainSignVO> page, MaintainSignVO maintainSign);

	void checkUserSignOut(Long planId);

    void systemSignByNotSignOut(Integer typeStatus);

    MaintainPlanUserDayCount selectUserDaySignCount(List<Long> planIds, List<Long> userIds);

	BigDecimal sumPlanWorkTime(Long planId);

	/**
	 * 根据工单id获取签到信息
	 * @param planIds 工单ids
	 * @return 数据集
	 */
	List<MaintainSign> getMaintainSignList(List<Long> planIds);

	/**
	 * 根据时间区间，查询 用户-工单列表
	 * @param htDaySearchCondition 参数
	 * @return HtUserPlanVO
	 */
    List<HtUserPlanVO> getHtUserPlanByTimeCondition(HtDaySearchCondition htDaySearchCondition);
}
